import request from '@/utils/agent_request';

//代理登录
export function agentLogin(data){
    return request({
        url:'/front/agent/login_agent',
        method:'post',
        data
    })
}

//代理登出
export function agentLogout(){
    return request({
        url:'/front/agent/logout',
        method:'get'
    })
}

//获取订单列表
export function getServiesOrderListApi(data){
    return request({
        url:'/front/agent/service-order/orderList',
        method:'get',
        params:data
    })
}

//更新代理员信息
export function updateAgent(data){
    return request({
        url:'/front/agent/editAgent',
        method:'post',
        data
    })
}

//获取代理佣金信息
export function getAgentIncomeInfo(){
    return request({
        url:'/front/agent/getIncome',
        method:'get'
    })
}

//获取代理提现列表
export function getAgentExtractListApi(params){
    return request({
        url:'/front/agent/service-agent-extract/extract_list',
        method:'get',
        params
    })
}

//代理提交提现信息
export function saveAgentExtractApi(data){
    return request({
        url:'/front/agent/service-agent-extract/extract_cash',
        method:'post',
        data
    })
}

//上传图片
export function uploadPicture(data){
    return request({
        url:'/front/agent/upload/image',
        method:'post',
        data
    })
}

export function closingConfigApi(){
    return request({
        url:'/front/agent/closing/config',
        method:'get'
    })
}

//订单图表
export function orderChartApi(data){
    return request({
        url:'/front/agent/ServiceHome/order_chart',
        method:'get',
        params:data
    })
}

//实时数据
export function timeStatisticApi(){
    return request({
        url:'/front/agent/ServiceHome/time_statistic',
        method:'get',
    })
}

//门店排行
export function companyRangeApi(params){
    return request({
        url:'/front/agent/ServiceHome/company_range',
        method:'get',
        params
    })
}

export function getSiteName(){
    return request({
        url:'/front/agent/site_name',
        method:'get'
    })
}

